package spec.asumuliu.unint4.clazz._abstract.outclazz;

/**
 * 球类，是父类
 */
public class Ball {
    // 成员属性
    private String name;
    private String dx;
    private String cz;
    private double zl;
    private String rq;
    // static修饰符表示类成员，不属于某个对象，为全类共有，一改全改
    final static String tc = "空气";
    static String shape = "圆";
    // 构造方法
    // 参数列表为空的构造方法称为默认构造方法
    public Ball(){
    }
    public Ball(String name, String dx, String cz, double zl, String rq){
        this.name = name;
        this.dx = dx;
        this.cz = cz;
        this.zl = zl;
        this.rq = rq;
    }
    // 成员方法
    String play(){
        return "每天打会球，健康一辈子。";
    }

    @Override
    public String toString() {
        return "Ball{" +
                "name='" + name + '\'' +
                ", dx='" + dx + '\'' +
                ", cz='" + cz + '\'' +
                ", zl=" + zl +
                ", rq='" + rq + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDx() {
        return dx;
    }

    public void setDx(String dx) {
        this.dx = dx;
    }

    public String getCz() {
        return cz;
    }

    public void setCz(String cz) {
        this.cz = cz;
    }

    public double getZl() {
        return zl;
    }

    public void setZl(double zl) {
        this.zl = zl;
    }

    public String getRq() {
        return rq;
    }

    public void setRq(String rq) {
        this.rq = rq;
    }
}